package com.ibeeking.found.org.service.common.enums;

import com.ibeeking.found.common.enums.BulletinTypeEnum;

/**
 * @Author ibeeking
 * @Description: 会员任务类型
 */
public enum EmployeeStatusEnum {
    EMPLOYEE_STATUS_ONJOB(1, "在职"),
    EMPLOYEE_STATUS_REMAIN(2, "留职"),
    EMPLOYEE_STATUS_RETIRE(3, "退休"),
    EMPLOYEE_STATUS_OFFJOB(4, "离职"),
    ;
    private Integer code;
    private String desc;

    EmployeeStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }


    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(Integer code) {
        for (EmployeeStatusEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }

    public static EmployeeStatusEnum getEnum(Integer code) {
        for (EmployeeStatusEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj;
            }
        }
        return null;
    }
}
